package response

type Data any

type Response struct {
	Code    int
	Message string
	Success bool
	Data    Data
}

type Error struct {
	Code    int
	Message string
}

func (e Error) Error() string {
	return e.Message
}

const (
	OK              = 0
	InvalidArgument = 100
	BusinessError   = 200
	UnknownError    = 300
)

var Msg = map[int]string{
	OK:              "OK",
	InvalidArgument: "参数错误",
	BusinessError:   "业务出现错误",
	UnknownError:    "出现未知问题",
}
